<div id="sidebar" class="clear">
<ul class="primary">
	<?php if ( bb_get_option('description') ) : ?><li id="about"><?php bb_option('description'); ?></li><?php endif; ?>
	<li id="subscribe"><a href="<?php bloginfo('rss2_url'); ?>" title="Subscribe to this blog's feed">Subscribe to feed</a></li>
	<li class="blurb">
		<?php login_form(); ?>
		<?php if ( is_bb_profile() ) profile_menu(); ?>
	</li>
	<li id="articles">
		<?php rewind_posts(); query_posts('orderby=DESC&cat=-2&showposts=5'); ?>
		<?php if (have_posts()) : ?>
		<h2>Recent Articles</h2>
		<ul>
		<li><em>Change the settings for this section in <code>sidebar.php</code>. The category ID using <code>cat</code> and number of posts using <code>showposts</code>. Read more about this at the WordPress Codex <code><a href="http://codex.wordpress.org/Template_Tags/query_posts">query_posts</a></code> page.</em></li>
		<?php while (have_posts()) : the_post(); ?>
			<li>
			<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
			<p class="excerpt"><?php $excerpt = explode("[...]",get_the_excerpt()); echo $excerpt[0]; ?> <a class="more-link" href="<?php the_permalink() ?>">More...</a></p>
			</li>
		<?php endwhile; ?>
		</ul><?php endif; ?>
	</li>
	<li class="ads">
		<h2>Sponsor Links</h2>
		<ul>
		<li><a href="#">Sponsor Link 1</a></li>
		<li><a href="#">Sponsor Link 2</a></li>
		<li><a href="#">Sponsor Link 3</a></li>
		<li><a href="#">Sponsor Link 4</a></li>
		<li><a href="#">Sponsor Link 5</a></li>
		</ul>
	</li>
<?php /* Widgetized sidebar */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar primary') ) : ?>
<?php endif; ?>
</ul>
<ul class="secondary">
	<li id="search">
		<h2>Search</h2>
		<form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
		<div>
		<label class="hidden" for="s"><?php _e('Search for:'); ?></label>
		<input id="s" name="s" type="text" value="Search the site..." onfocus="if (this.value == 'Search the site...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search the site...';}" size="10" tabindex="1" />
		<input type="submit" id="searchsubmit" value="Search" />
		</div>
		</form>
	</li>
	<li id="pages">
		<h2>Pages</h2>
		<ul>
		<?php wp_list_pages('title_li='); ?>
		</ul> 
	</li>	
	<li id="categories">
		<h2>Sections</h2>
		<ul>
		<?php wp_list_categories('title_li='); ?>
		</ul> 
	</li>
	<li id="archives">
		<h2>Archives</h2>
		<ul>
		<?php wp_get_archives('type=monthly&limit=12'); ?>
		</ul>
	</li>
	<li id="links">
		<?php wp_list_bookmarks('title_li=&category_before=&category_after='); ?>
	</li>

<?php /* Widgetized sidebar */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar secondary') ) : ?>


<?php endif; ?>
</ul>
	<div class="clear"></div>
</div>